package com.sikaryofficial.workbench.domain.mapping;

import com.sikaryofficial.workbench.domain.dto.req.order.GoodsOrderReq;
import com.sikaryofficial.workbench.domain.dto.req.order.OrderItemReq;
import com.sikaryofficial.workbench.domain.dto.resp.order.GoodsOrderDTO;
import com.sikaryofficial.workbench.domain.dto.resp.order.OrderItemDTO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author : wuweihong
 * @desc : TODO  请填写你的功能描述
 * @date : 2024-09-28
 */
@Mapper
public interface ShoppingCartMapping {

  ShoppingCartMapping INSTANCE = Mappers.getMapper(ShoppingCartMapping.class);

  /**
   * 商品订单req映射resp
   * @param req
   * @return
   */
  GoodsOrderDTO coverGoodsOrderToResp(GoodsOrderReq req);

  /**
   * 子订单实体映射resp
   * @param orderItem
   * @return
   */
  OrderItemDTO coverToResp(OrderItemReq orderItem);

  /**
   * 子订单实体集合映射resp
   * @param orderItem
   * @return
   */
  List<OrderItemDTO> coverListToResp(List<OrderItemReq> orderItem);

}
